﻿<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link href="./Public/Admin/Css/public.css" rel="stylesheet" type="text/css" />
<title>文章管理</title>
<script charset="utf-8" src="./Public/Admin/Js/editor/kindeditor-min.js"></script>
<script charset="utf-8" src="./Public/Admin/Js/editor/lang/zh_CN.js"></script>
<script type="text/javascript">
var editor;
KindEditor.ready(function(K) {
	editor = K.create('textarea[name="content"]', {
		allowFileManager : true
	});
});
</script>
</head>

<body>
<table width="100%" border="0" align="center" cellpadding="1" cellspacing="1" class="border">
	<tr class="topbg"><td>文章管理</td></tr>
	<tr class="tdbg">
	  <td height="30">&nbsp;&nbsp;<a href="?c=Article&a=index">管理首页</a>&nbsp;|&nbsp;<a href="?c=Article&a=add">添加文章</a></td>
	</tr>
</table>
<br />
<form id="form1" name="form1" method="post" action="?c=Article&a=insert" onsubmit="return checkForm()">
  <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="border">
    <tr class="title">
      <td colspan="2" align="center">添加文章</td>
    </tr>
    <tr class="tdbg">
      <td width="100" height="30" align="right">分&nbsp;&nbsp;类：</td>
      <td>
		<select name="category_id">
			<option value="0">无分类</option>
			<{foreach $categorys as $category }>
				<option value="<{$category['id'] }>"> <{str_repeat('--',$arr2['level']*2)}> <{$category['classname'] }></option>
			<{/foreach}>
		</select>
	  </td>
    </tr>
    <tr class="tdbg">
      <td height="30" align="right">标&nbsp;&nbsp;题：</td>
      <td><input name="title" type="text" size="90" maxlength="50" /></td>
    </tr>
    <tr class="tdbg">
      <td height="30" align="right">排&nbsp;&nbsp;序：</td>
      <td>
		<input name="orderby" type="text" value="50" size="2" maxlength="3" />
		<span style="padding-left:20px;">状态：</span>
		<select name="status">
			<option value="1">公开</option>
			<option value="2">草稿</option>
			<option value="3">隐藏</option>
		</select>
    <span style="padding-left:20px;">置顶：</span>
    <input name="top" type="checkbox" value="1" />
	  </td>
    </tr>
    <tr class="tdbg">
      <td height="30" align="right">内&nbsp;&nbsp;容：</td>
      <td><textarea name="content" style="width:95%;height:300px;visibility:hidden;"></textarea></td>
    </tr>
    <tr class="tdbg">
      <td height="30" align="right">&nbsp;</td>
      <td><input type="submit" value="添加" />
      <input type="button" onclick="history.go(-1)" value="返回" /></td>
    </tr>
  </table>
</form>
</body>
</html>
<script language="javascript">
function checkForm()
{
	if(document.form1.title.value=="")
	{
		alert("标题不能为空");
		document.form1.title.focus();
		return false;
	}
}
</script>